<template>
    <div >
        <TopMenu></TopMenu>
        <transition name="fade" mode="out-in">
            <router-view></router-view>
        </transition>
    </div>
</template>

<script>
    import TopMenu from './common/TopMenu'
    import jwtToken from './../helpers/jwt'
    export default {
        created(){
            // 每次刷新保持登录状态
            if(jwtToken.getToken()){
                this.$store.dispatch('setAuthUser')
            }
        },
        components:{
            TopMenu
        }
    }
</script>
